<?php
class Author_model extends CI_Model{
	function __construct(){
		parent::__construct();
	}

    function getAuthorByName($author_name){
        $this->db->where('author',$author_name);
        $author_info = $this->db->get('author')->result(true);
        return $author_info;
    }

    function insertAuthor($data){
        $this->db->insert('author',$data);
        return $this->db->insert_id();
    }

    function updateAuthor($data) {
        return $this->db->update('author',$data);
    }
}
?>